
		

-- D:\GOA\reslibrary\templete\res\modal\modalmgr.xsl 58
gr_module("gm_xinbanchunzhongyun")


mcgfwhpanelmgr = inherit(GmSql.list,GmBase.CallBack):name("mcgfwhpanelmgr")



mcgfwhpanelmgr.init = function (self,pagecount)

	local top = self
	
	
	GmSql.list.init(self,gInfo["path"]..'/'..g_local_db_name,'czy_whpanel')
	GmBase.CallBack.init(self)
	
	self.baseurl = ''

	self.idPair = {}
	self.idPair['prev'] = '0'
	self.idPair['next'] = '0'
	
	self.pageCount = pagecount or 10
	self.totalPage = 0
	
	self:reset_maxminid('czy_whpanel','id')
	
	
	self.action = {}
	self.op  = {}
	
	
	
	-----------------------------
	self.action['cgfwhpanelpost'] = {} 	
	-------
	self.op['cgfwhpanelpost'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwhpanelpost()
		for a,b in pairs(top.action['cgfwhpanelpost']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwhpanelpost(newpostparam)
		
	end	
		
  self.action['cgfwhpanelpost']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelpost']['list_id'] = { ['title'] = '浠撳簱ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfwhpanelpost']['wh_id'] = { ['title'] = '浠撲綅ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelpost']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelpost']['unit'] = { ['title'] = '鍗曚綅' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelpost']['spec'] = { ['title'] = '瑙勬牸' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelpost']['length'] = { ['title'] = '闀垮害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['width'] = { ['title'] = '瀹藉害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['thick'] = { ['title'] = '鍘氬害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['origin'] = { ['title'] = '浜у湴' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelpost']['quality'] = { ['title'] = '鏉愯川' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelpost']['color'] = { ['title'] = 'color' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelpost']['profile_thumb_url'] = { ['title'] = 'profile_thumb_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelpost']['profile_file_url'] = { ['title'] = 'profile_file_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelpost']['cost_price'] = { ['title'] = '鍗曚环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['sale_price'] = { ['title'] = '閿€鍞环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['min_inventory'] = { ['title'] = '鏈€灏忓瓨搴?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelpost']['bom_code'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfwhpanelpost']['color_code'] = { ['title'] = '棰滆壊缂栫爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '55' }	
  self.action['cgfwhpanelpost']['inventory'] = { ['title'] = '搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelpost']['warning_inventory'] = { ['title'] = '搴撳瓨鎶ヨ鍊?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelpost']['max_inventory'] = { ['title'] = '鏈€楂樺簱瀛?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelpost']['freeze_inventory'] = { ['title'] = '鍐荤粨搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelpost']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelpost']['barcode'] = { ['title'] = '鏉″舰鐮?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelpost']['update_time'] = { ['title'] = '鏈€杩戜竴娆′慨鏀规椂闂?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelpost']['inOut_time'] = { ['title'] = '鏈€杩戜竴娆″嚭鍏ュ簱鎿嶄綔鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelpost']['create_time'] = { ['title'] = '创建时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelpost']['check_inventory_time'] = { ['title'] = '鐩樺瓨鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelpost']['photo_data'] = { ['title'] = '妗嗗瀷鍥剧敤浜庢墦鍗版彁鍙?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwhpanelpost']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwhpanelitem'] = {} 	
	-------
	self.op['cgfwhpanelitem'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwhpanelitem()
		for a,b in pairs(top.action['cgfwhpanelitem']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwhpanelitem(newpostparam)
		
	end	
		
  self.action['cgfwhpanelitem']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelitem']['list_id'] = { ['title'] = '浠撳簱ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfwhpanelitem']['wh_id'] = { ['title'] = '浠撲綅ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelitem']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelitem']['unit'] = { ['title'] = '鍗曚綅' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelitem']['spec'] = { ['title'] = '瑙勬牸' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelitem']['length'] = { ['title'] = '闀垮害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['width'] = { ['title'] = '瀹藉害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['thick'] = { ['title'] = '鍘氬害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['origin'] = { ['title'] = '浜у湴' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelitem']['quality'] = { ['title'] = '鏉愯川' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelitem']['color'] = { ['title'] = 'color' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelitem']['profile_thumb_url'] = { ['title'] = 'profile_thumb_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelitem']['profile_file_url'] = { ['title'] = 'profile_file_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelitem']['cost_price'] = { ['title'] = '鍗曚环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['sale_price'] = { ['title'] = '閿€鍞环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['min_inventory'] = { ['title'] = '鏈€灏忓瓨搴?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelitem']['bom_code'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfwhpanelitem']['color_code'] = { ['title'] = '棰滆壊缂栫爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '55' }	
  self.action['cgfwhpanelitem']['inventory'] = { ['title'] = '搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelitem']['warning_inventory'] = { ['title'] = '搴撳瓨鎶ヨ鍊?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelitem']['max_inventory'] = { ['title'] = '鏈€楂樺簱瀛?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelitem']['freeze_inventory'] = { ['title'] = '鍐荤粨搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelitem']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelitem']['barcode'] = { ['title'] = '鏉″舰鐮?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelitem']['update_time'] = { ['title'] = '鏈€杩戜竴娆′慨鏀规椂闂?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelitem']['inOut_time'] = { ['title'] = '鏈€杩戜竴娆″嚭鍏ュ簱鎿嶄綔鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelitem']['create_time'] = { ['title'] = '创建时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelitem']['check_inventory_time'] = { ['title'] = '鐩樺瓨鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelitem']['photo_data'] = { ['title'] = '妗嗗瀷鍥剧敤浜庢墦鍗版彁鍙?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwhpanelitem']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwhpanelmodify'] = {} 	
	-------
	self.op['cgfwhpanelmodify'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwhpanelmodify()
		for a,b in pairs(top.action['cgfwhpanelmodify']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwhpanelmodify(newpostparam)
		
	end	
		
  self.action['cgfwhpanelmodify']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelmodify']['list_id'] = { ['title'] = '浠撳簱ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfwhpanelmodify']['wh_id'] = { ['title'] = '浠撲綅ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanelmodify']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelmodify']['unit'] = { ['title'] = '鍗曚綅' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelmodify']['spec'] = { ['title'] = '瑙勬牸' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelmodify']['length'] = { ['title'] = '闀垮害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['width'] = { ['title'] = '瀹藉害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['thick'] = { ['title'] = '鍘氬害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['origin'] = { ['title'] = '浜у湴' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanelmodify']['quality'] = { ['title'] = '鏉愯川' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelmodify']['color'] = { ['title'] = 'color' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanelmodify']['profile_thumb_url'] = { ['title'] = 'profile_thumb_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelmodify']['profile_file_url'] = { ['title'] = 'profile_file_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelmodify']['cost_price'] = { ['title'] = '鍗曚环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['sale_price'] = { ['title'] = '閿€鍞环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['min_inventory'] = { ['title'] = '鏈€灏忓瓨搴?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelmodify']['bom_code'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfwhpanelmodify']['color_code'] = { ['title'] = '棰滆壊缂栫爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '55' }	
  self.action['cgfwhpanelmodify']['inventory'] = { ['title'] = '搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelmodify']['warning_inventory'] = { ['title'] = '搴撳瓨鎶ヨ鍊?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanelmodify']['max_inventory'] = { ['title'] = '鏈€楂樺簱瀛?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanelmodify']['freeze_inventory'] = { ['title'] = '鍐荤粨搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanelmodify']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanelmodify']['barcode'] = { ['title'] = '鏉″舰鐮?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelmodify']['update_time'] = { ['title'] = '鏈€杩戜竴娆′慨鏀规椂闂?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelmodify']['inOut_time'] = { ['title'] = '鏈€杩戜竴娆″嚭鍏ュ簱鎿嶄綔鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelmodify']['create_time'] = { ['title'] = '创建时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelmodify']['check_inventory_time'] = { ['title'] = '鐩樺瓨鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanelmodify']['photo_data'] = { ['title'] = '妗嗗瀷鍥剧敤浜庢墦鍗版彁鍙?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwhpanelmodify']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwhpaneldetail'] = {} 	
	-------
	self.op['cgfwhpaneldetail'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwhpaneldetail()
		for a,b in pairs(top.action['cgfwhpaneldetail']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwhpaneldetail(newpostparam)
		
	end	
		
  self.action['cgfwhpaneldetail']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpaneldetail']['list_id'] = { ['title'] = '浠撳簱ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfwhpaneldetail']['wh_id'] = { ['title'] = '浠撲綅ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpaneldetail']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpaneldetail']['unit'] = { ['title'] = '鍗曚綅' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpaneldetail']['spec'] = { ['title'] = '瑙勬牸' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpaneldetail']['length'] = { ['title'] = '闀垮害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['width'] = { ['title'] = '瀹藉害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['thick'] = { ['title'] = '鍘氬害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['origin'] = { ['title'] = '浜у湴' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpaneldetail']['quality'] = { ['title'] = '鏉愯川' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpaneldetail']['color'] = { ['title'] = 'color' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpaneldetail']['profile_thumb_url'] = { ['title'] = 'profile_thumb_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpaneldetail']['profile_file_url'] = { ['title'] = 'profile_file_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpaneldetail']['cost_price'] = { ['title'] = '鍗曚环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['sale_price'] = { ['title'] = '閿€鍞环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['min_inventory'] = { ['title'] = '鏈€灏忓瓨搴?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpaneldetail']['bom_code'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfwhpaneldetail']['color_code'] = { ['title'] = '棰滆壊缂栫爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '55' }	
  self.action['cgfwhpaneldetail']['inventory'] = { ['title'] = '搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpaneldetail']['warning_inventory'] = { ['title'] = '搴撳瓨鎶ヨ鍊?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpaneldetail']['max_inventory'] = { ['title'] = '鏈€楂樺簱瀛?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpaneldetail']['freeze_inventory'] = { ['title'] = '鍐荤粨搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpaneldetail']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpaneldetail']['barcode'] = { ['title'] = '鏉″舰鐮?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpaneldetail']['update_time'] = { ['title'] = '鏈€杩戜竴娆′慨鏀规椂闂?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpaneldetail']['inOut_time'] = { ['title'] = '鏈€杩戜竴娆″嚭鍏ュ簱鎿嶄綔鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpaneldetail']['create_time'] = { ['title'] = '创建时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpaneldetail']['check_inventory_time'] = { ['title'] = '鐩樺瓨鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpaneldetail']['photo_data'] = { ['title'] = '妗嗗瀷鍥剧敤浜庢墦鍗版彁鍙?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwhpaneldetail']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwhpanellist'] = {} 	
	-------
	self.op['cgfwhpanellist'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwhpanellist()
		for a,b in pairs(top.action['cgfwhpanellist']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwhpanellist(newpostparam)
		
	end	
		
  self.action['cgfwhpanellist']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanellist']['list_id'] = { ['title'] = '浠撳簱ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfwhpanellist']['wh_id'] = { ['title'] = '浠撲綅ID' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwhpanellist']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanellist']['unit'] = { ['title'] = '鍗曚綅' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanellist']['spec'] = { ['title'] = '瑙勬牸' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanellist']['length'] = { ['title'] = '闀垮害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['width'] = { ['title'] = '瀹藉害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['thick'] = { ['title'] = '鍘氬害' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['origin'] = { ['title'] = '浜у湴' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '36' }	
  self.action['cgfwhpanellist']['quality'] = { ['title'] = '鏉愯川' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanellist']['color'] = { ['title'] = 'color' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfwhpanellist']['profile_thumb_url'] = { ['title'] = 'profile_thumb_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanellist']['profile_file_url'] = { ['title'] = 'profile_file_url' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanellist']['cost_price'] = { ['title'] = '鍗曚环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['sale_price'] = { ['title'] = '閿€鍞环' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['min_inventory'] = { ['title'] = '鏈€灏忓瓨搴?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanellist']['bom_code'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfwhpanellist']['color_code'] = { ['title'] = '棰滆壊缂栫爜' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '55' }	
  self.action['cgfwhpanellist']['inventory'] = { ['title'] = '搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanellist']['warning_inventory'] = { ['title'] = '搴撳瓨鎶ヨ鍊?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '18' }	
  self.action['cgfwhpanellist']['max_inventory'] = { ['title'] = '鏈€楂樺簱瀛?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '17' }	
  self.action['cgfwhpanellist']['freeze_inventory'] = { ['title'] = '鍐荤粨搴撳瓨' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '12' }	
  self.action['cgfwhpanellist']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwhpanellist']['barcode'] = { ['title'] = '鏉″舰鐮?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanellist']['update_time'] = { ['title'] = '鏈€杩戜竴娆′慨鏀规椂闂?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanellist']['inOut_time'] = { ['title'] = '鏈€杩戜竴娆″嚭鍏ュ簱鎿嶄綔鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanellist']['create_time'] = { ['title'] = '创建时间' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanellist']['check_inventory_time'] = { ['title'] = '鐩樺瓨鏃堕棿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwhpanellist']['photo_data'] = { ['title'] = '妗嗗瀷鍥剧敤浜庢墦鍗版彁鍙?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwhpanellist']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
  
 
  	
  
	self.session = {}
	
end   





mcgfwhpanelmgr.check_fields_validate = function(self,key,postparam)
	local checkfunc = {}
	checkfunc['t'] = function(fm,value)
		return true
	end
	checkfunc['min'] = function(fm,value)
		if string.len(value) < tonumber(fm) then
			return false
		end
		return true
	end
	checkfunc['max'] = function(fm,value)
		if string.len(value) > tonumber(fm) then
			return false
		end
		return true
	end
	local format = self.action[key]
	for fkey,fvalue in pairs(postparam) do
		if format[fkey] ~= nil then
			for fmkey,fmvalue in pairs(format[fkey]) do
				if checkfunc[fmkey] ~= nil then
					if checkfunc[fmkey](fmvalue,fvalue) == false then
						return false,tostring(format[fkey]['title']).." "..tostring(fmkey).." "..tostring(fmvalue).." error"
					end
				end
			end
		end
	end
	return true,""
end 


 
mcgfwhpanelmgr.get_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key]
end

mcgfwhpanelmgr.has_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key] ~= nil
end
 
 
mcgfwhpanelmgr.add_session = function(self,key,ses)
	self.session[key] = ses
end


mcgfwhpanelmgr.add_ui = function(self,key,ui)
	self.uis[key] = ui
end




-- todo
mcgfwhpanelmgr.run = function(self,key,ui)
	if self.action[key] ~= nil and self.op[key] ~= nil then
		local tb = {}
		for k,v in pairs(self.action[key]) do
			if ui[k] ~= nil and type(ui[k]) == 'table' and ui[k].get_text then
				tb[k] = ui[k]:get_text()
			else
				print('run error',key,k)
			end
		end
		local success,msg = self:check_fields_validate(key,tb)
		if success then
			self.op[key](tb,ui)
		else
			ui.hostWindow:showMsg(msg)
		end		
	else
		print('run error self.action',key)
	end
end


------------------------------------------------------------------------------------


mcgfwhpanelmgr.get_net_page = function(self,netmethon,attrs)
	local top = self	
	local discuz = GmBase.net.get_instance()
	local methon = netmethon
	if methon ~= nil and discuz[methon] then
		print('mcgfwhpanelmgr.get_net_page ',methon)
		local tbname,callbackey,tb = discuz[netmethon](discuz)
		for k,v in pairs(attrs) do
			tb[k] = attrs[k]
		end
		discuz[netmethon](discuz,tb)
	else
		print('mcgfwhpanelmgr.get_net_page error ',methon)
	end		
end




mcgfwhpanelmgr.get_prev_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfwhpanellist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page - 1		

		if attrs.page < 1 then
			attrs.page = 1
		end

		self:get_net_page(ui.netmethon,attrs)
	end
end


mcgfwhpanelmgr.get_next_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfwhpanellist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page + 1
		self:get_net_page(ui.netmethon,attrs)
	end
end

------------------------------------------------------------------------------------



mcgfwhpanelmgr.init_table = function(self)
	--[[
	local tablefield = {}
	
	--number
	tablefield['id'] = { ["i"] = 11, }
    
	--number
	tablefield['list_id'] = { ["i"] = 10, }
    
	--number
	tablefield['wh_id'] = { ["i"] = 11, }
    
	--string
	tablefield['name'] = { ["v"] = 64, }
    
	--string
	tablefield['unit'] = { ["v"] = 36, }
    
	--string
	tablefield['spec'] = { ["v"] = 64, }
    
	--number
	tablefield['length'] = { ["i"] = 12, }
    
	--number
	tablefield['width'] = { ["i"] = 12, }
    
	--number
	tablefield['thick'] = { ["i"] = 12, }
    
	--string
	tablefield['origin'] = { ["v"] = 36, }
    
	--string
	tablefield['quality'] = { ["v"] = 255, }
    
	--string
	tablefield['color'] = { ["v"] = 64, }
    
	--string
	tablefield['profile_thumb_url'] = { ["v"] = 255, }
    
	--string
	tablefield['profile_file_url'] = { ["v"] = 255, }
    
	--number
	tablefield['cost_price'] = { ["i"] = 12, }
    
	--number
	tablefield['sale_price'] = { ["i"] = 12, }
    
	--number
	tablefield['min_inventory'] = { ["i"] = 17, }
    
	--string
	tablefield['bom_code'] = { ["v"] = 32, }
    
	--string
	tablefield['color_code'] = { ["v"] = 55, }
    
	--number
	tablefield['inventory'] = { ["i"] = 18, }
    
	--number
	tablefield['warning_inventory'] = { ["i"] = 18, }
    
	--number
	tablefield['max_inventory'] = { ["i"] = 17, }
    
	--number
	tablefield['freeze_inventory'] = { ["i"] = 12, }
    
	--string
	tablefield['note'] = { ["v"] = 255, }
    
	--string
	tablefield['barcode'] = { ["v"] = 20, }
    
	--string
	tablefield['update_time'] = { ["v"] = 20, }
    
	--string
	tablefield['inOut_time'] = { ["v"] = 20, }
    
	--string
	tablefield['create_time'] = { ["v"] = 20, }
    
	--string
	tablefield['check_inventory_time'] = { ["v"] = 20, }
    
	--string
	tablefield['photo_data'] = { ["v"] = 20, }
    
	self:create_table( self.tablename, tablefield)
	]]
	self:initTableStruct()
end


	